<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:doc="livcos.org/ns/doc"
  xmlns:vz="livcos.org/ns/doc/visualization"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:f="livcos.org/ns/xslt/function"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:v="livcos.org/ns/view"
  exclude-result-prefixes="v doc vz c f xhtml">
	
	<!-- a visualization entity visualizes data in a specific way -->

	<xsl:import href="table.xsl"/>
	<xsl:import href="timeline.xsl"/>
	
	<xsl:template match="vz:data">
		<xsl:choose>
			<xsl:when test="@ref">
				<xsl:apply-templates select="f:entity(@ref)" mode="data"/>
			</xsl:when>
			<xsl:when test="@content-type = 'text/xml'">
				<xsl:copy-of select="*"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="*"	mode="data"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	
</xsl:stylesheet>
